package cn.ytian.scashier;

import java.io.Serializable;
import java.util.List;

import static cn.ytian.scashier.YLib.getTime;

public class Order implements Serializable {
    private String Oid;
    private String DateTemp;
    private double OPrice;
    private String Admin;
    private String Client;
    private List<SalesItem> sales;


    public Order() {
    }

    public Order(String oid, List<SalesItem> sales, double OPrice) {
        this.Oid = oid;
        this.sales = sales;
        this.OPrice = OPrice;


        DateTemp = getTime();
        this.Admin = Config.User;
        this.Client = null;
    }

    public Order(String oid, String dateTemp, double OPrice, String admin, String client, List<SalesItem> sales) {
        Oid = oid;
        DateTemp = dateTemp;
        this.OPrice = OPrice;
        Admin = admin;
        Client = client;
        this.sales = sales;
    }

    public String getOid() {
        return Oid;
    }

    public void setOid(String oid) {
        Oid = oid;
    }

    public String getDateTemp() {
        return DateTemp;
    }

    public void setDateTemp(String dateTemp) {
        DateTemp = dateTemp;
    }

    public double getOPrice() {
        return OPrice;
    }

    public void setOPrice(double OPrice) {
        this.OPrice = OPrice;
    }

    public List<SalesItem> getSales() {
        return sales;
    }

    public void setSales(List<SalesItem> sales) {
        this.sales = sales;
    }

    public String getAdmin() {
        return Admin;
    }

    public void setAdmin(String admin) {
        Admin = admin;
    }

    public String getClient() {
        return Client;
    }

    public void setClient(String client) {
        Client = client;
    }
}
